﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QueryExtractorInterface;
using System.Runtime.CompilerServices;

[assembly:InternalsVisibleTo("TestProject1")]
namespace QueryExtractorImplement
{
    public class QueryExtractor1 : IQueryExtractor
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }

        private QueryExtractor1()
        {
            ID = 1;
            Name = "exp1";
            Description = "description1";
        }

        public List<NewsQuery> Extract(News newsItem)
        {
            List<NewsQuery> listNewsQuery = new List<NewsQuery>();
            for (int i = 0; i < 10; ++i)
            {
                NewsQuery newsQuery = new NewsQuery();
                if (i == 0)
                {
                    newsQuery.News = new News();

                    newsQuery.News.ID = newsItem.ID;
                    newsQuery.News.Title = newsItem.Title;
                    newsQuery.News.Description = newsItem.Description;
                }
                newsQuery.Query = "query" + i;
                listNewsQuery.Add(newsQuery);
            }
            return listNewsQuery;
        }
    }
}
